export default {
    namespaced: true,
    state: {
        isShowToast: false,
        toastMsg: "手机号",
        toastType: '类型'
    },
    mutations: {
        changeisShowToast(state, payloay) {
            state.isShowToast = payloay.isShowToast
            if (payloay.isShowToast) {
                state.toastMsg = payloay.msg
                state.toastType = payloay.type
            }
        }
    },
    actions: {
        asyncchangeisShowToast(context, payloay) {
            context.commit('changeisShowToast', payloay)
            setTimeout(() => {
                context.commit("changeisShowToast", {
                    isShowToast: false
                })
            }, 1000);
        }
    }
}